(display "\n========================================\n")
(define (segment->painter segment-list)
    (lambda (frame)
            (for-each
                (lambda (segment)
                        (draw-line
                            ((frame-coord-map frame) (start-segment segment))
                            ((frame-coord-map frame) (end-segment segment))))
                segment-list)))

(define (make-vect x y)
    (list x y))

(define (make-segment start end)
    (list start end))

(define left-top (make-vect 0 1))
(define right-top (make-vect 1 1))
(define left-bottom (make-vect 0 0))
(define right-bottom (make-vect 1 0))

(define top (make-segment left-top right-top))
(define bottom (make-segment left-bottom right-bottom))
(define left (make-segment left-top left-bottom))
(define right (make-segment right-top right-bottom))

; Boarder
(define boarder (segment->painter (list top bottom left right)))

(define left-top-to-right-bottom (make-segment left-top right-bottom))
(define right-top-to-left-bottom (make-segment right-top left-bottom))

; Crose-X
(define cross (segment->painter (list left-top-to-right-bottom
                                      right-top-to-left-bottom)))

(define top-mid-point (make-vect 0.5 1))
(define bottom-mid-point (make-vect 0.5 0))
(define left-mid-point (make-vect 0 0.5))
(define right-mid-point (make-vect 1 0.5))

(define top-to-left (make-segment top-mid-point left-mid-point))
(define top-to-right (make-segment top-mid-point right-mid-point))
(define bottom-to-left (make-segment bottom-mid-point left-mid-point))
(define bottom-to-right (make-segment bottom-mid-point right-mid-point))

; Diamond
(define diamond (segment->painter (list top-to-left
                                        top-to-right
                                        bottom-to-left
                                        bottom-to-right)))

(define wave-list (list
                      (make-segment (make-vect 0.4 1.0)      ; 头部左上
                                    (make-vect 0.35 0.85))
                      (make-segment (make-vect 0.35 0.85)    ; 头部左下
                                    (make-vect 0.4 0.64))
                      (make-segment (make-vect 0.4 0.65)     ; 左肩
                                    (make-vect 0.25 0.65))
                      (make-segment (make-vect 0.25 0.65)    ; 左手臂上部
                                    (make-vect 0.15 0.6))
                      (make-segment (make-vect 0.15 0.6)     ; 左手上部
                                    (make-vect 0.0 0.85))

                      (make-segment (make-vect 0.0 0.65)     ; 左手下部
                                    (make-vect 0.15 0.35))
                      (make-segment (make-vect 0.15 0.35)    ; 左手臂下部
                                    (make-vect 0.25 0.6))

                      (make-segment (make-vect 0.25 0.6)     ; 左边身体
                                    (make-vect 0.35 0.5))
                      (make-segment (make-vect 0.35 0.5)     ; 左腿外侧
                                    (make-vect 0.25 0.0))
                      (make-segment (make-vect 0.6 1.0)      ; 头部右上
                                    (make-vect 0.65 0.85))
                      (make-segment (make-vect 0.65 0.85)    ; 头部右下
                                    (make-vect 0.6 0.65))
                      (make-segment (make-vect 0.6 0.65)     ; 右肩
                                    (make-vect 0.75 0.65))
                      (make-segment (make-vect 0.75 0.65)    ; 右手上部
                                    (make-vect 1.0 0.3))

                      (make-segment (make-vect 1.0 0.15)     ; 右手下部
                                    (make-vect 0.6 0.5))
                      (make-segment (make-vect 0.6 0.5)      ; 右腿外侧
                                    (make-vect 0.75 0.0))

                      (make-segment (make-vect 0.4 0.0)      ; 左腿内侧
                                    (make-vect 0.5 0.3))
                      (make-segment (make-vect 0.6 0.0)      ; 右腿内侧
                                    (make-vect 0.5 0.3))))

; Wave
(define wave (segment->painter wave-list))

(display "\n========================================\n")
